package gsd.gaudi.server.replayer.draw;

import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Shape;
import java.awt.geom.Ellipse2D;

public class DummyMouse {

	private Component prevComponent;
	
	public DummyMouse(){
		
	}
	
	public void drawMouse(Component c){
	
		//Graphics2D g2 = (Graphics2D)g;
		//Shape circle = new Ellipse2D.Float( (c.getX()/100+(c.getWidth()/200)),  
		//									(c.getY()/100+(c.getWidth()/200)),
		//									10.0f, 10.0f);
		Shape circle = new Ellipse2D.Float( c.getWidth()/2,  
											c.getHeight()/2,
											10.0f, 10.0f);
		Graphics2D ga = (Graphics2D)c.getGraphics();
		if(this.prevComponent != null){
			this.prevComponent.repaint(0, 0, this.prevComponent.getWidth(), this.prevComponent.getHeight());
		}
		this.prevComponent = c;
		//ga.draw(circle);
		ga.setPaint(Color.red);
		ga.fill(circle);		
	}
	
}
